﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TouchSocket.Core;

namespace YS.Domain.IoT.Logging
{
    internal class Mylog4netLogger : TouchSocket.Core.ILog
    {
       // private readonly log4net.ILog m_logger;

        public Mylog4netLogger()
        {
           // this.m_logger = log4net.LogManager.GetLogger("Test");
        }

        public LogLevel LogLevel { get; set; }

        public void Log(LogLevel logLevel, object source, string message, Exception exception)
        {
            //此处就是实际的日志输出

            //switch (logLevel)
            //{
            //    case LogLevel.Trace:
            //        this.m_logger.Debug(message, exception);
            //        break;

            //    case LogLevel.Debug:
            //        this.m_logger.Debug(message, exception);
            //        break;

            //    case LogLevel.Info:
            //        this.m_logger.Info(message, exception);
            //        break;

            //    case LogLevel.Warning:
            //        this.m_logger.Warn(message, exception);
            //        break;

            //    case LogLevel.Error:
            //        this.m_logger.Error(message, exception);
            //        break;

            //    case LogLevel.Critical:
            //        this.m_logger.Error(message, exception);
            //        break;

            //    case LogLevel.None:
            //    default:
            //        break;
            //}
        }
    }
}
